from selenium.webdriver.common.by import By

from base.base_action import BaseAction


class HomePage(BaseAction):
    password_login_button = By.ID, "switcher_plogin"

    username_edit_text = By.ID, "u"

    password_edit_text = By.ID, "p"

    login_button = By.ID, "login_button"

    def click_password_login(self):
        self.click(self.password_login_button)

    def input_username(self, text):
        self.input(self.username_edit_text, text)

    def input_password(self, text):
        self.input(self.password_edit_text, text)

    def click_login(self):
        self.click(self.login_button)
